package org.apache.dolphinscheduler.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;
import java.util.Objects;

@TableName("t_ds_example_data")
public class ExampleData {
    /**
     * id
     */
    @TableId(value="id", type= IdType.AUTO)
    private int id;
    @TableId(value="out_path")
    private String outPath;
    @TableId(value="create_time")
    private Date createTime;
    @TableId(value="update_time")
    private Date updateTime;
    @TableId(value="property")
    private String property;
    @TableId(value="name")
    private String name;

    @TableField(exist = false)
    private String[] columns;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String[] getColumns() {
        return columns;
    }

    public void setColumns(String[] columns) {
        this.columns = columns;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOutPath() {
        return outPath;
    }

    public void setOutPath(String outPath) {
        this.outPath = outPath;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    @Override
    public String toString() {
        return "ExampleData{" +
                "id=" + id +
                ", outPath='" + outPath + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", property='" + property + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ExampleData that = (ExampleData) o;
        return id == that.id &&
                Objects.equals(outPath, that.outPath) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(property, that.property);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, outPath, createTime, updateTime, property);
    }
}
